package com.party.service;

import java.io.UnsupportedEncodingException;
import java.util.List;

import com.party.domain.Blurb;

import com.party.domain.Img;
import com.party.domain.Product;

public interface ProductService 
{
	//添加商品
	public int addProduct(String type,String validTime,String city,String description,String title,String value);
	//添加商品详情
	public void addBlurb(int productId,String address,String numberPeople,String numberBed,String numberRoom,String supportingFacility,String blurbLabel,String supplement,String warmPrompt,String btype);
	//添加商品图片
	public void addImage(int productid,String address);
	
	//用id删除商品
	public void deleteProduct (int id)throws Exception;
	
	//用id删除商品详情
	public void deleteBlurb(int id)throws Exception;
	
	//用id删除商品图片
	public void deleteImage(int id)throws Exception;
	
	
	//根据类型分页查询商品
	public List<Product> findTypeProduct(String type,int page,int size)throws Exception;

	//根据二级分类查询商品 分类
	public List<Product> FindBlurbTypeProduct(String type,int page,int size)throws Exception;
	
	//测试用的
	public List<Product> findTypeceshi(String type)throws UnsupportedEncodingException;

	//根据id查询商品详情
	public Blurb getIdBlurb(int id)throws Exception;
	
	//根据id查询商品图片
	public List<Img> getIdImg(int id)throws Exception;
	
	public Product getIdProduct(int id)throws Exception;
	
	//public List<Commodity> getIdCommodity(int pid)throws Exception; 
	
	
	//根据id更新商品
	public void updateIdProduct(Product pro);
	
	//根据id更新商品详情
	public void updateIdBluct(Blurb blu);
	



}
